<template>
  <div>
    <Chart :cdata="cdata" />
  </div>
</template>

<script>
import * as DataApi from "@/http/DataApi.js";
import Chart from './chart.vue';
export default {
  data () {
    return {
      cdata: {
        xData: [],
        seriesData: []
      }
    }
  },
  components: {
    Chart,
  },
    created(){
    },
  mounted () {
      DataApi.getAll().then((res) => {
          this.cdata.xData=res.data.category
          this.cdata.seriesData=res.data.data
      });
  },
  methods: {
  }
}
</script>

<style lang="scss" scoped>
</style>
